#include <include/Game/Game.h>
#include <Entities/actor.h>
#include "debugskill.h"

namespace skill {
    bool Refreash::use(Game *g, const std::vector<std::string> &params) {
        for (auto i: origin->skillList)
            if (i.second->hasPrefix("_CoolDownSkill_")) {
                (dynamic_cast<CoolDownSkill *>(i.second))->cd_timer = 0;
            }
        return true;
    }

    bool AutoCleanse::use(Game *g, const std::vector<std::string> &params) {
        std::vector<Skill*> buffList;
        for (auto i: origin->skillList)
            if (i.second->hasPrefix("_Buff_")) {
                buffList.push_back(i.second);
            }
        for (auto i: buffList){
            origin->unlearnSkill(i);
        }
        return true;
    }
}